package ai.moran.demo.service.impl;

import ai.moran.demo.entity.PersonTable;
import ai.moran.demo.service.PersonTableService;
import ai.moran.demo.service.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;



/**
 * @author zhuhaitao
 * @email zhuhaitao@imoran.net
 * @date 2020/7/30 1:47 下午
 */
@Service
public class TestImpl implements Test {
    @Autowired
    private PersonTableService personTableService;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void test2() {
        PersonTable personTable=new PersonTable();
        personTable.setName("小刚");
        personTableService.save(personTable);
    }
}
